﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WaterRevenueMS.Domain.Common.Models;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace WaterRevenueMS.Domain.ViewModels.Charge.ChargeRecord
{
    public class ChargeRecordModel : EntityCommon 
    {
        public ChargeRecordModel()
        {
            Search = new SearchModel();
            {

            };
        }

         public int Id { get; set; }

        [Display(Name = "备注")]
        public string Bei_Z { get; set; }

        public int User_ID { get; set; }
        public string Liu_SH { get; set; }
       
        public DateTime CreateDT { get; set; }
        public DateTime ReviseDT { get; set; }

        public string Chao_BDT { get; set; }
        public string Jiao_FDT { get; set; }

        [Display(Name = "用户名")]
        public string UserName { get; set; }
        [Display(Name = "用户编号")]
        public string User_NO { get; set; }
        [Display(Name = "用户余额")]
        public float Yong_HYE { get; set; }

        [Display(Name = "水表编号")]
        public string Meter_NO { get; set; }

        [Display(Name = "用水类型")]
        public string WaterTpye { get; set; }
        [Display(Name = "用水单价")]
        public string WaterPrice { get; set; }
      

        [Display(Name = "本期读数")]
        public float Ben_QDS { get; set; }
        [Display(Name = "上期读数")]
        public float Shang_QDS { get; set; }
        [Display(Name = "本期用量")]
        public float Ben_QYL { get; set; }
        [Display(Name = "合计用量")]
        public float He_JYL { get; set; }
        [Display(Name = "本次计费")]
        public float Ben_CJF { get; set; }

        [Display(Name = "缴费金额")]
        public float Jiao_FJE { get; set; }

        public float Up_YE { get; set; }

        [Display(Name = "缴费类型")]
        public int Jiao_FLX { get; set; }

        [Display(Name = "缴费状态")]
        public int Jiao_FZT { get; set; }

        [Display(Name = "收费员")]
        public string Shou_FY { get; set; }

        [Display(Name = "用户地址")]
        public string Yong_HDZ { get; set; }

        [Display(Name = "用户电话")]
        public string Lian_XDH { get; set; }


        public SearchModel Search { get; set; }

        public string Jiao_FZTLX
        {
            get
            {
                if (Jiao_FZT == 1)
                {
                    return "未缴费";
                }
                else
                {
                    if (Jiao_FZT == 2)
                    {
                        return "已缴费";
                    }
                    else
                    {
                        if (Jiao_FZT == 3)
                        {
                            return "等待EXCEL导入数据";
                        }
                        else
                        {

                            if (Jiao_FZT == 4)
                            {
                                return "撤销收费";
                            }
                            else
                            {
                                return "其它";

                            }

                        }

                    }
                    // return "";
                }

            }
            set { }
        }

    }
    public class SearchModel
    {
        public SearchModel()
        {
          
        }


        public int Id { get; set; }

        [Display(Name = "备注")]
        public string Bei_Z { get; set; }

        public int User_ID { get; set; }
        public string Liu_SH { get; set; }
        public int? Cao_ZLX { get; set; }



        public DateTime? CreateDT { get; set; }
        public DateTime? ReviseDT { get; set; }


        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Display(Name = "用户编号")]
        public string User_NO { get; set; }

        [Display(Name = "用户余额")]
        public string Yong_HYE { get; set; }

        [Display(Name = "用户电话")]
        public string Lian_XDH { get; set; }

        [Display(Name = "读数本次")]
        public float Ben_QDS { get; set; }

        [Display(Name = "缴费金额")]
        public float Jiao_FJE { get; set; }


        [Display(Name = "缴费类型")]
        public int Jiao_FLX { get; set; }

        [Display(Name = "缴费状态")]
        public int Jiao_FZT { get; set; }

    }
}


